<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{admin/_fragments::head(~{::title})}">
    <meta charset="UTF-8">
    <!--    引入semantic-ui的CSS库-->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <!--    引入typo的CSS库-->
    <link rel="stylesheet" href="../../static/css/typo.css" th:href="@{/css/typo.css}">
    <!--    引入Animate.css的CSS库-->
    <link rel="stylesheet" href="../../static/css/animate.css" th:href="@{/css/animate.css}">
    <!--    引入prism的CSS库-->
    <link rel="stylesheet" href="../../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <!--    引入tocbot的CSS库-->
    <link rel="stylesheet" href="../../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <!--    引入自定义的CSS-->
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">
    <title>博客管理登录</title>
</head>
<body>

<br>
<br>
<br>

<div class="m-container-small m-padded-tb-massive" style="max-width: 30em !important;">
    <div class="ui container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">
<!--                    <img src="assets/images/logo.png" class="image">-->
                    <div class="content">
                        管理后台登录
                    </div>
                </h2>
                <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                    <div class="ui  segment" >
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="用户名">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="密码">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button">登录</button>
                    </div>

                    <div class="ui mini error message" ></div>
                    <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}"></div>

                </form>

<!--                <div class="ui message">-->
<!--                    新用户？ <a href="login.php#">注册</a>-->
<!--                </div>-->
            </div>
        </div>
    </div>
</div>

<!--外部js库-->
<div th:replace="~{admin/_fragments::script}">
    <!--    引入jquery-->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <!--    引入semantic-ui的js库-->
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <!--    引入scrollTo的js库-->
    <script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <!--    引入prism的js库-->
    <script th:src="@{/lib/prism/prism.js}"></script>
    <!--    引入tocbot的js库-->
    <script th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <!--    引入qrcode.js的js库-->
    <script th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <!--    引入waypoints的js库-->
    <script th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
</div>

<script>
    // 表单输入验证
    $('.ui.form').form({
        fields: {
            username: {
                identifier: 'username',
                rules: [{
                    type: 'empty',
                    prompt: '请输入用户名'
                }]
            },
            password: {
                identifier: 'password',
                rules: [{
                    type: 'empty',
                    prompt: '请输入密码'
                }]
            }
        }
    });
</script>
</body>
</html>